test(snap): add pnpm v11 snap tests for command adaptation coverage#1289
Draft
test(snap): add pnpm v11 snap tests for command adaptation coverage#1289
Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
Member
Author
How to use the Graphite Merge QueueAdd the label auto-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Add 26 snap test cases for pnpm@11.0.0-beta.6, mirroring the existing pnpm10 test suite, to ensure command adaptation stability as pnpm v11 approaches release. Notable differences captured: - link/unlink fails with ERR_PNPM_LOCKFILE_CONFIG_MISMATCH - `pnpm why` output format restructured - `packageManagerDependencies` now appear in install output - cache, dlx, owner, view, vpx output remain identical
155a35d to
733d977
Compare
Member
Author
Bump all 26 pnpm11 snap test cases to pnpm@11.0.0-rc.5 and regenerate snap.txt. The ERR_PNPM_LOCKFILE_CONFIG_MISMATCH issue in link/unlink persists in rc.5, confirming it's a stable v11 behavioral change.
pnpm v11 made `pnpm unlink` actually perform a reconciling install after removing the override from pnpm-workspace.yaml. Under CI=true the install defaults to --frozen-lockfile, which fails with ERR_PNPM_LOCKFILE_CONFIG_MISMATCH because the lockfile still carries the override that was just removed. Pass `--no-frozen-lockfile` through to pnpm in the two affected snap tests and note the requirement in the RFC's supported-versions list. Also adds pnpm@11.x entries to the Test Package Manager Versions sections of 7 RFCs covering add/remove/install/update/outdated/why/ dedupe/link-unlink.
The 22.11.0 pin inherited from the pnpm10 variant predates vp's current minimum (^20.19.0 || >=22.12.0), causing the dlx step to fail with an incompatible-node error. Bump to the latest v22 LTS.
Member
Author
|
@cursor review |
pnpm v11 moved project-scope config from .npmrc into pnpm-workspace.yaml, which only accepts camelCase keys. The inherited kebab-case key tripped ERR_PNPM_CONFIG_SET_UNSUPPORTED_WORKSPACE_KEY. Rename the test key to vitePlusPmConfigTestKey so set/get/delete round-trip cleanly.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c4e9579. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Add 26 snap test cases for
pnpm@11.0.0-rc.5, mirroring the existing pnpm10 test suite, to validatevp's command-adaptation layer against the upcoming pnpm v11 release.Coverage
New
snap-tests-global/*-pnpm11fixtures for: add, cache, config, dedupe, dlx, link, list, outdated, owner, pack, prune, publish, remove, unlink, update, view, vpx, why, dev-engines-runtime — plus workspace variants for add/list/outdated/pack/remove/update/why.pnpm v11 compatibility findings
cache,dlx,owner,view,vpx— output identical to pnpm v10.add,install,link— now reportpackageManagerDependencies(@pnpm/exe,pnpm) as part of install output; captured in snapshots.why— output format restructured from tree-based to flat; captured in snapshots.publish --dry-run— pnpm v11 no longer delegates to npm; minor output diff captured.unlink(workaround applied) — pnpm v11 now runs a reconciling install after removing the override frompnpm-workspace.yaml. UnderCI=truethis defaults to--frozen-lockfileand fails withERR_PNPM_LOCKFILE_CONFIG_MISMATCH. Fix: snap tests pass-- --no-frozen-lockfiletovp unlink.configat project scope (workaround applied) — pnpm v11 moved project config from.npmrcintopnpm-workspace.yaml, which only accepts camelCase keys. Test key renamed tovitePlusPmConfigTestKey.dev-engines-runtime— bumped pinned Node.js to22.22.2to satisfy vp's current minimum (^20.19.0 || >=22.12.0).prune— skipped onwin32(platform-specific output instability, matches other tests).Global install is not affected —
vp install -galready forces npm.RFC updates
Added
pnpm@11.x [WIP]entries to the Test Package Manager Versions sections of 7 RFCs:add-remove,dedupe,install,link-unlink,outdated,update,why. Thelink-unlinkentry documents the-- --no-frozen-lockfilerequirement under CI.Test plan
pnpm -F vite-plus snap-test-global pnpm11— all 26 cases pass with clean exit codescargo test -p vite_install --lib commands::unlink— unit tests still pass